<HTML>
<HEAD>
    <TITLE>Grammar of Taste</TITLE>
</HEAD>
<BODY>
<h2>EBNF Grammar of Taste</h2>
<pre>
Taste =      "PROGRAM" ident ";" Body ident ".".
Body =       { "VAR" {ident ":" TypeId ";"} 
             | "PROCEDURE" ident ";" Body Ident ";" 
             } 
             "BEGIN" StatSeq "END". 

StatSeq =    Stat {";" Stat}. 
Stat =       [ ident [":" "=" Expression] 
             | "IF" Expression "THEN" StatSeq ["ELSE" StatSeq ] "END" 
             | "WHILE" Expression "DO" StatSeq "END" 
             | "READ" ident 
             | "WRITE" Expression 
             ]. 

Expression = SimExpr [RelOp SimExpr]. 
SimExpr =    Term {AddOp Term}. 
Term =       Factor {MulOp Factor}. 
Factor =     (ident | "TRUE" | "FALSE" | number | "-" Factor). 

AddOp =      "+" | "-". 
MulOp =      "*" | "/". 
RelOp =      "=" | "<" | ">". 
TypeId =     "INTEGER" | "BOOLEAN".

</pre>
</body>
</html>
